package com.bingo.news.action;

import java.util.Map;

import org.apache.struts2.interceptor.RequestAware;
import org.apache.struts2.interceptor.SessionAware;
import org.apache.struts2.interceptor.ParameterAware;

import com.bingo.facade.InewsFacade;

public class MakeNewsAction implements SessionAware, RequestAware, ParameterAware 
{
	private Map request;
	private Map session;
	private Map parameters;
	public Map getRequest() {
		return request;
	}
	public void setRequest(Map request) {
		this.request = request;
	}
	public Map getSession() {
		return session;
	}
	public void setSession(Map session) {
		this.session = session;
	}
	public Map getParameters() {
		return parameters;
	}
	public void setParameters(Map parameters) {
		this.parameters = parameters;
	}
	
	private InewsFacade newsFacade;
	
	public InewsFacade getNewsFacade() {
		return newsFacade;
	}
	public void setNewsFacade(InewsFacade newsFacade) {
		this.newsFacade = newsFacade;
	}
	
	public void delete(String sqlSwitch, Object obj) throws Exception {
		newsFacade.delete(sqlSwitch, obj);
	}
	public void insert(String sqlSwitch, Object obj) throws Exception {
		newsFacade.insert(sqlSwitch, obj);
	}
	public Object select(String sqlSwitch, Number primaryKey) throws Exception {
		return newsFacade.select(sqlSwitch, primaryKey);
	}
	public void update(String sqlSwitch, Object obj) throws Exception {
		newsFacade.update(sqlSwitch, obj);
	}
	
	public String getAllNews()
	{
		//request.put("newsList",newsFacade.)
		return "success";
	}
	
}
